//将我们http.js中封装好的  get,post.put,delete  导过来
import { axios_get, axios_post, axios_delete, axios_put } from './http.js'


export const getUserList = (params, headers) => axios_get("/user/user/", params, headers)
export const getRoleList = (params, headers) => axios_get("/user/role/", params, headers)

export const getUserList1 = (params, headers) => axios_put("/user/user/", params, headers)
export const getRoleList1 = (params, headers) => axios_put("/user/role/", params, headers)

// 工单模板管理
export const getFlowConfList = (params, headers) => axios_get("/work/flowconf/", params, headers)
export const addFlowConf = (params, headers) => axios_post("/work/flowconf/", params, headers)
export const updateFlowConf = (params, headers) => { return axios_put('/work/flowconf/' + params.id + '/', params, headers) }  // 获取一个具体用户信息
export const deleteFlowConf = (params, headers) => { return axios_delete('/work/flowconf/' + params.id + '/', params, headers) }  // 获取一个具体用户信息
export const getFlowConfInfo = (params, headers) => { return axios_get('/work/flowconf/' + params.id +"/",params, headers) }  // 获取一个具体工单模板
export const addWorkOrderInstance = (params, headers) => axios_post("/work/workorder/instance/", params, headers)
// 审批子工单
export const approveSubOrder = (params, headers) => axios_post("/work/workorder/approve/", params, headers)
// 子工单
export const getSubOrderList = (params, headers) => axios_get("/work/suborder/list/", params, headers)

export const getWorkOrderList = (params, headers) => axios_get("/work/workorder/", params, headers)
   